<template>
<div>
  <h1>网络请求-2</h1>
  {{ info }}
</div>
</template>
<script>
import { getRankData } from "./service";
export default {
 data() {
  return {
    info: {}
  }
 },
 async created() {
   const res = await getRankData(6) || {}
   // 接口的code和后端约定好的
   if(res.code) return false;
   this.info = res?.topinfo || {}
 }
}
</script>